package com.wxy.demo.design_pattern.abstract_factory;

/**
 * <p>
 *
 * </p>
 *
 * @author e-Xiaoyuan.Wang
 * @since 2022/11/4 10:07
 */
public class FactoryProducer {
    public PcFactory getFactory(String type) {
        if (type.equalsIgnoreCase("HP")) {
            return new HpFactory();
        } else if (type.equalsIgnoreCase("DELL")) {
            return new DellFactory();
        }
        return null;
    }
}
